from text2vec import SentenceModel

sentences = ['如何更换花呗绑定银行卡', '花呗更改绑定银行卡']
model = SentenceModel('/home/shilihua/.cache/modelscope/hub/models/thomas/text2vec-base-chinese')  # 768 s2p 句子匹配段落

model = SentenceModel(
    "/home/shilihua/.cache/modelscope/hub/models/Jerry0/text2vec-large-chinese")  # 1024 text2vec 句子匹配句子 专为句子相似度计算和特征提取任务设计

print(model.get_sentence_embedding_dimension())
embeddings = model.encode(sentences)
print(embeddings)